package 最后24大厂仿真;

import java.util.Arrays;

public class FZ7牛牛的特殊数游戏 {
    static class Solution {
        private static final String Now = "Now";
        private static final String coder = "coder";
        private static final String Nowcoder = "Nowcoder";

        public String[] specialNumber(int n) {
            String[] res = new String[n];
            for (int i = 1; i <= n; i++) {
                String temp;
                if (i % 3 == 0 && i % 5 == 0) {
                    temp = Nowcoder;
                } else if (i % 3 == 0) {
                    temp = Now;
                } else if (i % 5 == 0) {
                    temp = coder;
                } else {
                    temp = String.valueOf(i);
                }
                res[i - 1] = temp;
            }
            return res;
        }

    }

    public static void main(String[] args) {
        Solution solution = new Solution();
        System.out.println(Arrays.toString(solution.specialNumber(15)));
    }
}
